---
title: SAIF.Application operations and processes
summary: Abstract lifecycle contract and structural operations supported by this library.
status: draft
owner: SAIF BOF documentation team
last_reviewed: 2026-08-21
library: SAIF.Application
reference_type: embedded
---

# SAIF.Application operations and processes

This page is the operation catalog and cross-operation hub for this library. SAIF.Application defines an **abstract lifecycle contract**, not concrete workflow implementations — concrete steps are supplied by subclasses in other libraries (out of scope). Each operation's detailed, step-by-step logic lives in its own page under `operations/`.

## Operation catalog
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Initialize application manager](operations/initialize-application-manager.md) | Establish the security principal and let a concrete subclass wire its own initialization and data layer | Concrete subclass constructor/factory invokes `New(inSecurityPrincipal)` then `Initialize()` | `clsSecurityPrincipal` | Initialized `AppManagerBase` instance with populated `DataLayer` | [BR-APP-004](business-rules.md#br-app-004-retrieve-none-write-none-abstract-contract) | N/A | N/A |
| [Register a database connection portal](operations/register-database-connection-portal.md) | Configure connection parameters and register a named SQL Server or Oracle data portal | Concrete code invokes `CreateSQLServerPortal(inKey)` or `CreateOraclePortal(inKey)` | `DBUser`, `Database`, `Server`, `BatchID`, `inKey` | Registered `IDataPortalInfo`, retrievable via `DPI(key)` | N/A | N/A | N/A |
| [Check and cache AD resource authorization](operations/check-and-cache-ad-resource-authorization.md) | Determine and cache whether the current principal has access to a caller-supplied AD resource | Concrete subclass of `UserAccess` calls `HasAccess(inResourceName)` or `CheckAccess(...)` | `inResourceName` (string) | Cached boolean authorization result | [BR-APP-003](business-rules.md#br-app-003-cached-ad-resource-authorization-result) | N/A | N/A |
| [Accumulate and format display messages](operations/accumulate-and-format-display-messages.md) | Append non-duplicate messages to an accumulated display string, and independently format message arrays for Windows/Web display | Concrete subclass calls `AppendMessageLines` or `MessageFormatting.GetMessagesForWindows`/`GetMessagesForWeb`/`GetMessagesUserDefined` | Message string(s) or array | Updated `Message` property or a concatenated display string | [BR-APP-001](business-rules.md#br-app-001-non-empty%2C-non-duplicate-message-accumulation) | N/A | N/A |

## Process flow diagram
The following diagram visualizes the primary operational flow across operations.

```mermaid
flowchart TD
	Start([Concrete subclass constructed]) --> Init[Initialize application manager]
	Init --> Sec{OnCheckSecurity sets role?}
	Sec -->|Update/ViewOnly| DataLayer[Register data connection portal]
	Sec -->|NoAccess default| Restricted([Access restricted])
	DataLayer --> Access[Check and cache AD resource authorization]
	Access --> Messages[Accumulate and format display messages]
	Messages --> EndOk([Ready for Retrieve/Write])
```

## Inherited operations and processes

Operations in this section originate from base classes provided by dependency framework libraries. They are inherited or delegated, not implemented in this library.

### From `clsBusinessBase` (`SAIF.Framework.Core`)

| Operation | Intent | Provided by | Origin | Embedded in |
| --- | --- | --- | --- | --- |
| Edit-session management (open/commit/roll back) | Manage `BeginEdit`/`CancelEdit`/`ApplyEdit` state for the object† | `clsBusinessBase` | `SAIF.Framework.Core` | [Initialize application manager](operations/initialize-application-manager.md) |
| Rule evaluation and save dispatch | Evaluate rules in severity order and dispatch insert/update/delete on `Save()`† | `clsBusinessBase` | `SAIF.Framework.Core` | [Initialize application manager](operations/initialize-application-manager.md) |

> **Origin**: These operations are defined in `SAIF.Framework.Core` / `clsBusinessBase` and inherited by `AppManagerBase`. No direct evidence in this library's own code shows them being invoked — `AppManagerBase` instead layers its own parallel `MustOverride` lifecycle contract on top of the inherited surface.*

## Failure and edge-case behavior
- `UserAccess.CheckAccess`'s per-call result is discarded into a local variable that is reset to `Nothing` and never returned; its only observable effect is warming the `HasAccess` cache.*
- `ServiceResponse.ProcessException` loops on `ex.InnerException` (not the current local exception) on each iteration, which would infinite-loop if `ex.InnerException` is non-Nothing; not confirmed to have been exercised at runtime.**
- Until a concrete subclass calls `MarkUpdate()`/`MarkViewOnly()`, `AppManagerBase` defaults to `NoAccess` (fail-closed).*

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Application\AppManagerBase.vb`
- `SAIF.Application\ApplicationDataAccess.vb`
- `SAIF.Application\UserAccess.vb`
- `SAIF.Application\MessageFormatting.vb`
- `SAIF.Application\Service Based\ServiceResponse.vb`
- Legends CLI RAG service (indexed documentation for `clsBusinessBase`, source library `SAIF.Framework.Core`)
